package com.xy.spectator;

import com.xy.action.Action;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/17 17:10
 * @description
 */
public abstract class Spectator {
     private String name;
     private String sex;

    public Spectator(String name, String sex) {
        this.name = name;
        this.sex = sex;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    // 提供一个方法，让访问者可以访问
    public abstract void accept(Action action);
}
